<form nz-form [formGroup]="validateForm">
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzRequired>分类名称</nz-form-label>
    <nz-form-control [nzSpan]="12" [nzErrorTip]="titleErrorTpl">
      <input nz-input formControlName="title" placeholder="请输入角色名称" />
      <!-- 校验数据 -->
      <ng-template #titleErrorTpl let-control>
        <ng-container *ngIf="control.hasError('required')">
          请输入分类名
        </ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7">排序</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <input nz-input formControlName="sort" placeholder="排序" />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7">描素</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <textarea nz-input formControlName="description" placeholder="请输入简单描素"
        [nzAutosize]="{ minRows: 2, maxRows: 6 }"></textarea>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSpan]="7">状态</nz-form-label>
    <nz-form-control [nzSpan]="12">
      <nz-select name="select-validate" [ngModel]="status" formControlName="status">
        <nz-option nzValue="0" nzLabel="禁用"></nz-option>
        <nz-option nzValue="1" nzLabel="可用"></nz-option>
      </nz-select>
    </nz-form-control>
  </nz-form-item>
</form>
